﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Hotel.Models.Entity
{
    public class Service
    {
        private int _pkServiceID;
        private GroupService _groupService;
        private string _name;
        private string _units;
        private int _entered;
        private int _instock;
        private int _outStock;
        private double _price;
        private string _description;
        private bool _isInOut;
        private string _total;
        private string _pricedis;

        public Service()
        {
            _pkServiceID = 0;
            _groupService = new GroupService();
            _name = string.Empty;
            _units = string.Empty;
            _entered = 0;
            _instock = 0;
            _outStock = 0;
            _price = 0;
            _description = string.Empty;
            _isInOut = false;
            _total = "";
            Pricedis = "";
        }

        public int PkServiceId
        {
            get { return _pkServiceID; }
            set { _pkServiceID = value; }
        }

        public GroupService GroupService
        {
            get { return _groupService; }
            set { _groupService = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public string Units
        {
            get { return _units; }
            set { _units = value; }
        }

        public int Entered
        {
            get { return _entered; }
            set { _entered = value; }
        }

        public int Instock
        {
            get { return _instock; }
            set { _instock = value; }
        }
         public int Outstock
        {
            get { return _outStock; }
            set { _outStock = value; }
        }

        public double Price
        {
            get { return _price; }
            set { _price = value; }
        }

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public bool IsInOut
        {
            get { return _isInOut; }
            set { _isInOut = value; }
        }

        public string Total
        {
            get
            {
                double vl = Outstock*Price;
                //_total=String.Format("{ 0:C}", vl);
                //_total=vl.ToString("#,##0.00");
                _total = vl.ToString("#,##0");
                return _total;
            }
            set { _total = value; }
        }

        public string Pricedis
        {
            get
            {
                _pricedis = _price.ToString("#,##0");
                return _pricedis;
            }
            set { _pricedis = value; }
        }
    }
}